package com.yjd.comm.smsverify.service;


import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.smsverify.model.SmsVerifyModel;

/**
 * <b>description</b>：短信验证码业务接口<br>
 * <b>time</b>：2017-06-27 08:57:32 <br>
 * <b>author</b>：  yangchangyan@yijiedai.com
 */
public interface ISmsVerifyService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public SmsVerifyModel insert(SmsVerifyModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(SmsVerifyModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param mobile_number
	 * @return
	 * @throws Exception
	 */
	public int delete(long mobile_number) throws Exception;

	/**
	 * 发送短信
	 * @param mpNumber
	 * @return boolean
	 * @throws Exception
	 */
	public int sendMessage(String mpNumber) throws Exception;

    /**
     * 比较短信
     * @param mobile
     * @param code
     * @return boolean
     * @throws Exception
     */
    public int compareMessageCode(String mobile, String code, int msgCount, int max) throws Exception;

}
